package cn.tedu.project.oa.assessProject.service.impl;

import cn.tedu.project.oa.assessProject.mapper.TargetMapper;
import cn.tedu.project.oa.assessProject.pojo.entity.Target;
import cn.tedu.project.oa.assessProject.service.ITargetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TargetServiceImpl implements ITargetService {
    @Autowired
    private TargetMapper targetMapper;

    /**
     * 查询考核指标
     *
     * @param id 考核指标主键
     * @return 考核指标
     */
    @Override
    public Target selectTargetById(Long id)
    {
        return targetMapper.selectTargetById(id);
    }

    /**
     * 查询考核指标列表
     *
     * @param target 考核指标
     * @return 考核指标
     */
    @Override
    public List<Target> selectTargetList(Target target)
    {
        return targetMapper.selectTargetList(target);
    }

    /**
     * 新增考核指标
     *
     * @param target 考核指标
     * @return 结果
     */
    @Override
    public int insertTarget(Target target)
    {
        return targetMapper.insertTarget(target);
    }

    /**
     * 修改考核指标
     *
     * @param target 考核指标
     * @return 结果
     */
    @Override
    public int updateTarget(Target target)
    {
        return targetMapper.updateTarget(target);
    }

    /**
     * 批量删除考核指标
     *
     * @param ids 需要删除的考核指标主键
     * @return 结果
     */
    @Override
    public int deleteTargetByIds(Long[] ids)
    {
        return targetMapper.deleteTargetByIds(ids);
    }

    /**
     * 删除考核指标信息
     *
     * @param id 考核指标主键
     * @return 结果
     */
    @Override
    public int deleteTargetById(Long id)
    {
        return targetMapper.deleteTargetById(id);
    }
}
